package demo4.contorller;

import demo4.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserController {
    @Autowired
    private UserService userService;

    public void doLogin(){//接收用户登录请求
        System.out.println("UserController:接收用户登录请求");
        System.out.println("UserController:获取用户登录信息");
        boolean success = userService.login("admin","123456");
        if(success){
            System.out.println("UserController:向用户响应登录成功");
        }else{
            System.out.println("UserController:向用户响应登录失败");
        }
    }
}
